-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated app.config.chain.getById()
calls to newer trpc.community.getCommunity()
+ cleanup/state-refactor of related components
#8779
Conversation
…tCommunityByIdQuery`
…cified condition
…e community with RQ"
…e community with RQ"
…e community with RQ"
…y`+ update community with RQ
…useGetCommunityByIdQuery`
…ching community data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
half way through 😓
now going to do some manual testing
packages/commonwealth/client/scripts/state/api/communities/getCommuityById.ts
Show resolved
Hide resolved
packages/commonwealth/client/scripts/views/components/sidebar/external_links_module.tsx
Outdated
Show resolved
Hide resolved
...onwealth/client/scripts/views/modals/ManageCommunityStakeModal/ManageCommunityStakeModal.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- getting this error on dashboard page load
[13:22:00.257] ERROR (index.ts): INTERNAL_SERVER_ERROR: [ZodError] subscription.getCommentSubscriptions: [
{
"code": "invalid_type",
"expected": "object",
"received": "null",
"path": [
0,
"Comment",
"Thread"
],
"message": "Expected object, received null"
}
]
err: {
"type": "ZodError",
"message": "[\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"null\",\n \"path\": [\n 0,\n \"Comment\",\n \"Thread\"\n ],\n \"message\": \"Expected object, received null\"\n }\n]",
"stack":
ZodError: [
{
"code": "invalid_type",
"expected": "object",
"received": "null",
"path": [
0,
"Comment",
"Thread"
],
"message": "Expected object, received null"
}
]
at get error [as error] (file:///Users/marcin/Desktop/Projects/commonwealth/node_modules/.pnpm/[email protected]/node_modules/zod/lib/index.mjs:587:31)
at ZodArray.parseAsync (file:///Users/marcin/Desktop/Projects/commonwealth/node_modules/.pnpm/[email protected]/node_modules/zod/lib/index.mjs:715:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async outputMiddleware (file:///Users/marcin/Desktop/Projects/commonwealth/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/index.mjs:308:26)
at async callRecursive (file:///Users/marcin/Desktop/Projects/commonwealth/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/index.mjs:451:32)
at async callRecursive (file:///Users/marcin/Desktop/Projects/commonwealth/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/index.mjs:451:32)
at async resolve (file:///Users/marcin/Desktop/Projects/commonwealth/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/index.mjs:481:24)
at async inputToProcedureCall (file:///Users/marcin/Desktop/Projects/commonwealth/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/resolveHTTPResponse-2fc435bb.mjs:46:22)
at async Promise.all (index 0)
at async resolveHTTPResponse (file:///Users/marcin/Desktop/Projects/commonwealth/node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/resolveHTTPResponse-2fc435bb.mjs:182:37)
"aggregateErrors": [
{
"type": "Object",
"message": "Expected object, received null",
"stack":
"code": "invalid_type",
"expected": "object",
"received": "null",
"path": [
0,
"Comment",
"Thread"
]
}
],
"issues": [
{
"code": "invalid_type",
"expected": "object",
"received": "null",
"path": [
0,
"Comment",
"Thread"
],
"message": "Expected object, received null"
}
],
"name": "ZodError"
}
-
this api cal looks weird (maybe it is ok but just want to double check)
-
Filtering by stake does not work
-
getting stake error on community load
Actually nothing related to stake does not work, I can't see indicator in left sidebar -
infinite loader on create community flow when reserving namespace
- community I just created -> I am not admin of this community, cannot see admin capabilities section
Re: #8779 (review)
|
@masvelio Thanks for the detailed review. I addressed all the feedback in #8779 (comment) Also cc: @jnaviask - point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Zod validation error on communities page
Kapture.2024-08-14.at.10.27.03.mp4
Tested issues I found yesterday, work well now, thanks for fixing them. Added couple small comments + found 1 issue with zod validation. Apart from that, looks good to me. Fantastic job!
packages/commonwealth/client/scripts/views/pages/DirectoryPage/CommunityDirectoryCard/index.tsx
Outdated
Show resolved
Hide resolved
packages/commonwealth/client/scripts/views/pages/NotificationSettingsOld/SubscriptionEntry.tsx
Show resolved
Hide resolved
Re: #8779 (review)
This also relates to |
…ork-enum-type Convert ChainNetwork type to string.
The |
Member count seems broken on the /members page but otherwise this PR seems good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Members issue looks like it's my machine and not part of this PR.
Link to Issue
Closes: #8762
Description of Changes
app.config.chains.getById
references in favor of newertrpc.community.getCommunity
route/bulkOffchain
API merged intrpc.community.getCommunity
routeChainInfo
object usage"How We Fixed It"
N/A
Test Plan
We have to ensure nothing that referenced
app.config.chain.getById()
brokeDeployment Plan
N/A
Other Considerations
The changes in this pr will lead to some more cleanup/refinement. Created these tickets to make those changes as a follow-up.
ChainInfo.ts
#8811EXCEPTION_CASE_threadCountersStore
#8812